package com.hua.base;
//隐式类型转换
public class Implicit_type_conversion {

    public static void main(String[] args) {

        short a = 1;
//        a +=1;/

        a ++;  //上面的语句相当于将 s1 + 1 的计算结果进行了向下转型：

        System.out.println(a);
        System.out.println(getType(a));

        a = (short) (a +1);

        System.out.println(getType(a));
    }

    private static String getType(Object obj) {
        return obj.getClass().getName();
    }


}
